<?php
if(!defined('SERVER_ROOT_PATH'))
    include ('../__global.php');

class op_index extends ml_controller 
{   
    
    public function initParam()
    {
    }
    public function checkParam()
    {
    }
    public function main()
    {
        if(ml_tool_ua::is_sinaMobileRead())
        {
            echo file_get_contents('view/wml/op_index.html');
            die;
        }
        
        ml_tool_actionlog::view_index($this->__visitor['uid']);
        
        $data = array();
        $data['banners'] = ml_tool_getdata::mlJsonData('indexbanner','operate');
        //$data['recommendalbum'] = ml_tool_getdata::mlJsonData('recommendalbum','operate');
        //$data['todayhotcategory'] = ml_tool_getdata::mlJsonData('todayhotcategory','operate');
        $data['recommendactivities'] = ml_tool_getdata::mlJsonData('recommendactivities','operate');
        //$astro = ml_tool_getAstro::astro(date('Y-m-d'));
        //$data['astro'] = $astro;
        //$data['cons'] = ml_tool_getdata::mlJsonData('consetllation_'.$astro,'consetllation');
        $data['hottag'] = ml_tool_getdata::mlJsonData('hottags', 'operate'); 
        $data['share'] = ml_tool_getdata::mlJsonData('share','operate');
        
        $share_rid_array = array();
        $oOpmark = new ml_biz_opmark_parse();
        foreach($data['share'] as &$value){
            $value['ctg_html'] = implode('' , $value['category']);
            $oOpmark->start($value['ctg_html']);
            $oOpmark->func_rid2attN();
            $oOpmark->func_rid2islike($this->__visitor['uid'] , ' ico_like_cur');
            $value['ctg_html'] = $oOpmark->end();
        }


        //$data['hotalbum'] = ml_tool_getdata::mlJsonData('hotalbum','operate');
        //$data['brandrecommend'] = ml_tool_getdata::mlJsonData('brandrecommend','operate'); 
        //$data['footrecommend'] = ml_tool_getdata::mlJsonData('footrecommend','operate');
        $this->set_page_title("首页");
        $this->set_scope_var('$activities' , $data['recommendactivities']);
        $this->page_output('op_index' , $data);
    }
}
new op_index();
?>